package com.mutouren.common.utils;

import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;

import org.apache.commons.io.IOUtils;

public class StreamUtils {
	public static String toString(InputStream input) throws IOException {
		return IOUtils.toString(input);
	}
	
    public static String toString(InputStream input, String encoding) throws IOException {
    	return IOUtils.toString(input, encoding);
    }
    
    public static byte[] toByteArray(InputStream input) throws IOException {
    	return IOUtils.toByteArray(input);
    }
    
    public static void closeQuietly(Closeable closeable) {
    	IOUtils.closeQuietly(closeable);
    }
}
